User View Model
ViewModel preparing and managing data related with the list of users since 3.0.0
Constructors
Link copied to clipboard
Constructor
Link copied to clipboard
open fun UserViewModel(@NonNull channelUrl: String, @Nullable queryHandler: PagedQueryHandler<T>)
Content copied to clipboard
Constructor
Functions
Link copied to clipboard
open fun addOperator(@NonNull userId: String, @Nullable handler: OnCompleteHandler)
Content copied to clipboard
Adds user with
userId
as operators.Link copied to clipboard
open fun addOperators(@NonNull userIds: List<String>, @Nullable handler: OnCompleteHandler)
Content copied to clipboard
Adds users with id in
userIds
as operators.Link copied to clipboard
Tries to connect Sendbird Server and retrieve a channel instance.
Link copied to clipboard
protected abstract fun createQueryHandler(@NonNull channelUrl: String): PagedQueryHandler<T>
Content copied to clipboard
Create a query handler that is loading paged data.
Link copied to clipboard
Returns LiveData that can be observed if the channel has been deleted.
Link copied to clipboard
Returns LiveData that can be observed if the current user has been unregistered from the operator.
Link copied to clipboard
Returns LiveData that can be observed for the status of the result of fetching the user list.
Link copied to clipboard
Returns LiveData that can be observed for the list of users.
Link copied to clipboard
Returns
false
as the user list do not support to load for the previous by default.Link copied to clipboard
open fun inviteUser(@NonNull userIds: List<String>, @Nullable handler: OnCompleteHandler)
Content copied to clipboard
Invites users with id in
userIds
to the channel.Link copied to clipboard
Requests the list of
User
s for the first time.Link copied to clipboard
Returns the empty list as the user list do not support to load for the previous by default.
Link copied to clipboard
open fun removeOperator(@NonNull userId: String, @Nullable handler: OnCompleteHandler)
Content copied to clipboard
Dismisses operator with
userId
.Link copied to clipboard
open fun unmuteUser(@NonNull userId: String, @Nullable handler: OnCompleteHandler)
Content copied to clipboard
Unmutes the user with
userId
.